#define _CRT_SECURE_NO_WARNINGS

#include "DoubleLinkedList.h"

int main()
{
	int i = 0;
	DLLNode* phead = DLL_Init();
	for (i = 1; i < 10; i++)
	{
		DLL_PushBack(phead, i);
	}
	DLL_PrintList(phead);
	DLL_EraseAfter(&phead);
	DLL_EraseAfter(&phead);
	DLL_EraseAfter(&phead);
	DLL_PrintList(phead);
	DLL_EraseBefore(&phead);
	DLL_EraseBefore(&phead);
	DLL_EraseBefore(&phead);
	DLL_PrintList(phead);
	DLL_InsertAfter(phead->next, -1);
	DLL_InsertAfter(phead->prev, -1);
	DLL_InsertAfter(phead, -1);
	DLL_PrintList(phead);
	DLL_InsertBefore(phead->next, -2);
	DLL_InsertBefore(phead->prev, -2);
	DLL_InsertBefore(phead, -2);
	DLL_PrintList(phead);
	DLL_Erase(&(phead->next));
	DLL_Erase(&(phead->next));
	DLL_Erase(&(phead->next));
	DLL_Erase(&(phead->next));
	DLL_Erase(&(phead->next));
	DLL_Erase(&(phead->next));
	DLL_PrintList(phead);
	DLL_DestroyList(&phead);

	return 0;
}